package Demo3;

import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 洪汤泽大帅哥
 * Date: 2024-12-22
 * Time: 15:43
 */
/* 请在这里填写答案 */
class NotSanjiaoException extends Exception {
    public NotSanjiaoException(String message) {
        super(message);
    }
}
class Sanj{
    private double x;
    private double y;
    private double z;

    public Sanj(double x, double y, double z) throws NotSanjiaoException {
        if (x+y>z&&x-y<z){
            this.x = x;
            this.y = y;
            this.z = z;
        }
        else {
            throw new NotSanjiaoException("三边长不能构成三角形");
        }
    }
    public double getArea(){
        return x*y/2.0;
    }
}

public class Main{
    public static void main(String args[])   {
        try {
            Scanner scan=new Scanner(System.in);
            double a,b,c;
            a=scan.nextDouble();b=scan.nextDouble();c=scan.nextDouble();
            Sanj sj=new Sanj(a,b,c);
            System.out.println("三角形面积为："+sj.getArea());
        }catch(Exception e) {
            System.out.println(e);
        }
    }
}
